import request from '@/utils/request'

// 司机APP相关接口
/**
 * 点击结束行程
 * @param {*} data 
 * @returns 
 */
export const endRouteOperation = (data) => {
    return request.post('/admin-core/client/driver/v1/endRouteOperation', data)
}

/**
 * 抢单
 * @param {*} data 
 * @returns 
 */
export const grabOrder = (data) => {
    return request.post('/admin-core/client/driver/v1/grabOrder', data)
}

/**
 * 登录
 * @param {*} data 
 * @returns 
 */
export const login = (data) => {
    return request.post('/admin-core/client/driver/v1/login', data)
}

/**
 * 个人信息
 * @param {*} data 
 * @returns 
 */
export const queryDriverInfo = (data) => {
    return request.post('/admin-core/client/driver/v1/queryDriverInfo', data)
}

/**
 * 我的订单
 * @param {*} data 
 * @returns 
 */
export const queryDriverOrderInfo = (data) => {
    return request.post('/admin-core/client/driver/v1/queryDriverOrderInfo', data)
}

/**
 * 查询订单池
 * @param {*} data 
 * @returns 
 */
export const queryPageOrderPool = (data) => {
    return request.post('/admin-core/client/driver/v1/queryPageOrderPool', data)
}

/**
 * 点击开始行程
 * @param {*} data 
 * @returns 
 */
export const startRouteOperation = (data) => {
    return request.post('/admin-core/client/driver/v1/startRouteOperation', data)
}

/**
 * 修改密码
 * @param {*} data 
 * @returns 
 */
export const updateLoginPassword = (data) => {
    return request.post('/admin-core/client/driver/v1/updateLoginPassword', data)
}

/**
 * 查询通知列表
 * @param {*} data 
 * @returns 
 */
export const queryNoticeList = (data) => {
    return request.post('/admin-core/client/driver/v1/queryNoticeList', data)
}

/**
 * 读取通知
 * @param {*} data 
 * @returns 
 */
export const readNotice = (data) => {
    return request.post('/admin-core/client/driver/v1/readNotice', data)
}

/**
 * 确认接单接口
 * @param {*} data 
 * @returns acceptOrderState 是否接单 0 否 1 是
 */
export const confirmAcceptOrder = (data) => {
    return request.post('/admin-core/client/driver/v1/confirmAcceptOrder', data)
}

/**
 * 上传照片接口
 * @param {*} filePath 
 * @returns 
 */
export const uploadPhoto = (filePath) => {
    return request.upload('/admin-core/client/driver/v1/uploadPhoto', filePath)
}

/**
 * 确认到达上车点接口
 * @param {*} data 
 * @returns 
 */
export const confirmArrivalPickUpPoint = (data) => {
    return request.post('/admin-core/client/driver/v1/confirmArrivalPickUpPoint', data)
}

// 1. /client/driver/v1/uploadPhoto
// 入参： file
// 返回：FileResponse（结构文档里有）
// 2. 新增接口  /client/driver/v1/confirmArrivalPickUpPoint（确认到达上车点，确认接单后才有，开始行程前）
// 入参： orderUuid，fileRequestList
// 3. 修改接口：/client/driver/v1/endRouteOperation（结束行程）
// 新增入参：   fileRequestList
